package cn.rxls.community.dto.goods;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 商品订单新增
 */
@Data
public class AddOrdersGoodsDTO {
    /**
     * 商品id
     */
    @NotNull(message = "非法商品")
    private Long id;


    /**
     * 购买数量
     */
    @NotNull(message = "最小购买量为1")
    @Min(value = 1,message = "最小购买量为1")
    @Max(value = 99,message = "最大购买量为99")
    private Integer num;

    /**
     * 优惠卷id
     */
    private Long coupons;
}
